home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group95c.txt / 000013_icon-group-sender _Mon Sep 25 10:29:30 1995.msg < prev    next >
Internet Message Format  |  1996-01-03  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Mon, 25 Sep 1995 12:34:53 MST
  2. Date: Mon, 25 Sep 1995 10:29:30 -0700
  3. From: Gregg Townsend <gmt>
  4. Message-Id: <9509251729.AA06258@hawk.CS.Arizona.EDU>
  5. To: icon-group@cs.arizona.edu
  6. Subject: Re:  Questions on map() and /
  7. Cc: Steve_Graham@vos.stratus.com
  8. Errors-To: icon-group-errors@cs.arizona.edu
  9.  
  10.     From: Steve_Graham@vos.stratus.com
  11.     
  12.             procedure tabulate(word)
  13.                /uses[word] := table()
  14.                uses[word][lineno] := 1
  15.                return
  16.             end
  17.  
  18.     What does the / in /uses mean?
  19.  
  20. It means "uses[word], if null".  The first time a word is seen, a
  21. table must be created for that word.  This checks for that situation,
  22. indicated by a null entry for uses[word], and assigns a new table
  23. to that slot in "uses".
  24.  
  25.         ...
  26.           map(line) ? while tab(upto(&letters)) do {
  27.         ...
  28.  
  29.     What does function does map serve?
  30.  
  31. Map transliterates characters like the "tr" utility of Unix.  With
  32. default parameters, it translates upper case characters into lower case.
  33. The purpose of this is to make the program case-insensitive.
  34.  
  35.     Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
  36.     +1 520 621 4325     gmt@CS.Arizona.EDU     110 57 16 W / 32 13 45 N / +758m
  37.